<?php
/**
 *      [迷你云] (C)2009-2012 南京恒为网络科技.
 *   软件仅供研究与学习使用，如需商用，请访问www.miniyun.cn获得授权
 * 
 */
?>
<?php


class COwnerUser implements IUserSourceInterface
{
    private $_initialized = false;
    
    public function  __construct()
    {
    }

    
    public function getUser($userInfo){
        $userName = $userInfo['userName'];
        $password = $userInfo['password'];

        $user =  User::model()->find("user_name=?", array($userName));
        if (empty($user)){
            return false;
        }

        if ($user['user_status'] == 0){
            return false;
        }

        $signPassword = CSecret::passSign($password, $user["salt"]);
        if ($user["user_pass"] == $signPassword){
            $retData = array();
            $retData['user_name'] = $user['user_name'];
            return $retData;
        }
        return false;
    }

    
    public function judgeSelf(){
        return false;
    }
}
?>